//
//  ShapeDemo.swift
//  SwiftUIDemo
//
//  Created by Tilt Wang on 2025/6/25.
//

import SwiftUI

struct ShapeDemo: View {
    var body: some View {
        VStack {
            Circle() //圆
    //            .fill(.yellow)
    //            .foregroundColor(.pink)
    //            .stroke(.blue)
    //            .stroke(.red, style: StrokeStyle(lineWidth: 20, lineCap: .round, dash: [30.0]))
                .trim(from: 0.2, to: 1.0)
                .stroke(.purple, lineWidth: 5)
//            Ellipse() // 椭圆
//            Capsule()// 胶囊
            RoundedRectangle(cornerRadius: 20) //矩形
                .frame(width: 200, height: 100)
//                .trim(from: 0.2, to: 1.0)
//                .stroke(.purple, lineWidth: 5)
        }
        
        
    }
}

#Preview {
    ShapeDemo()
}
